<template>
    <div class="wrapper">
        <head-title :title="headText" @callback="onClickLeft"></head-title>
        <div class="noticeDetails wrapbd">
            <h1>{{noticDetails.title}}</h1>
            <p>{{noticDetails.content}}</p>
            <time>{{noticDetails.create_time | fmtDate}}</time>
        </div>
    </div>
</template>
<script>
	import HeadTitle from "./../../components/title.vue"
	export default {
		data(){
			return {
                headText: '公告信息详情',  //顶部标题
                noticDetails:{},
			}
		},
		mounted(){
            this.initialize();  //获取公告列表详情
		},
		methods:{
			//返回
            onClickLeft () { this.$router.go(-1)},
			//拉取数据
            initialize(){
                let _this = this;
				this.Tools.AXIOS({
                    url: 'notice/detail',
                    transformRequest: {
                    	id:_this.$route.query.id,
                    },
                    success: function (res) {
                       let result = res.data.data;
                       _this.noticDetails = result;
                    }
                })
			},
		},
		components: {
			HeadTitle
		},
	}
</script>
<style scoped>
.wrapper{ position: absolute; height: 100%; background: #fff;}
.noticeDetails h1{ width: 100%; font-size: .35rem; font-weight: normal; text-align: center; overflow: hidden; padding: .4rem 0;}
.noticeDetails p{ width: 95%; color: #666; margin: .4rem auto; font-size: .35rem; line-height: .6rem; text-indent: .7rem;}
.noticeDetails time{ width: 90%; color: #666; text-align: right; display: block; margin: 5% auto;}
</style>
